Skip to content

feat(web): add web generator #285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 17, 2025
Merged

feat(web): add web generator #285

merged 4 commits into from
Jul 17, 2025

Conversation

avivkeller
Copy link
Member

@avivkeller avivkeller commented May 28, 2025

Fixes #7.

This PR adds the web generator.

Tasks / Issues

P1 – Must Complete Before Merge

  • Add more items (anyone can do this as they review1)

P2 – Must complete before migration

  • Add more items (anyone can do this as they review1)

P3 – Can Be Done in a Follow-up

  • Remove mustache dependency
  • Adding a tooltip/expand to the DataTag
  • Use new Orama UI
  • Add more items (anyone can do this as they review1)

Footnotes

  1. Add things as they appear, or leave review comments. 2 3

@codecov-commenter
Copy link

codecov-commenter commented May 28, 2025

Codecov Report

Attention: Patch coverage is 64.06480% with 732 lines in your changes missing coverage. Please review.

Project coverage is 70.80%. Comparing base (41ce248) to head (55d2ec7).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/generators/jsx-ast/utils/buildContent.mjs 26.02% 145 Missing ⚠️
src/generators/web/utils/bundle.mjs 13.33% 91 Missing ⚠️
src/generators/web/utils/generate.mjs 18.81% 82 Missing ⚠️
src/generators/web/utils/css.mjs 21.35% 81 Missing ⚠️
src/generators/jsx-ast/utils/buildSignature.mjs 44.00% 70 Missing ⚠️
src/generators/web/utils/processing.mjs 33.33% 60 Missing ⚠️
...rc/generators/jsx-ast/utils/buildPropertyTable.mjs 76.16% 46 Missing ⚠️
src/generators/web/index.mjs 40.54% 44 Missing ⚠️
src/generators/jsx-ast/index.mjs 26.00% 37 Missing ⚠️
src/generators/jsx-ast/utils/transformer.mjs 12.00% 22 Missing ⚠️
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #285      +/-   ##
==========================================
- Coverage   72.14%   70.80%   -1.35%     
==========================================
  Files         117      128      +11     
  Lines        9992    11621    +1629     
  Branches      597      694      +97     
==========================================
+ Hits         7209     8228    +1019     
- Misses       2780     3390     +610     
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@avivkeller avivkeller marked this pull request as ready for review May 28, 2025 22:13
@avivkeller avivkeller requested a review from a team as a code owner May 28, 2025 22:13
@avivkeller avivkeller marked this pull request as draft May 29, 2025 16:36
@avivkeller
Copy link
Member Author

avivkeller commented May 30, 2025

🎉 The code now dehydrates to the client so it can render without JavaScript!

@AugustinMauroy
Copy link
Member

🎉 The code now dehydrates to the client so it run without JavaScript!

Wow 😵‍💫 and what about codetab

@avivkeller
Copy link
Member Author

avivkeller commented May 30, 2025

It rehydrates and runs with JS, but if you don't have JS, you can still view the docs. I used React's SSRing

@avivkeller
Copy link
Member Author

@AugustinMauroy and I got search to finally work 🎉
image

@avivkeller avivkeller force-pushed the feat/web/gen branch 2 times, most recently from 024bbea to dbfe55d Compare June 3, 2025 21:40
@avivkeller
Copy link
Member Author

@nodejs/nodejs-website @nodejs/web-infra ChangeHistory and SideBar aren't implemented yet, so this is still a draft, but it's ready for you to take a look, so feel free to review :-)

@avivkeller avivkeller linked an issue Jun 6, 2025 that may be closed by this pull request
Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like you to see if you could simplify or outsource some of the complex .filter/.map functions, so that JavaScript doesn't need to redeclare the function on every call.

There are some visual nitpicks of my liking that if you don't mind would be nice (for me) to be addressed just as it makes my brain go less brrrr.

Finally, just give a last self-review, go through the whole diff slowly and see if there's anything you want to improved.

I'm approving with the hpyothesis that you're going to do that... Or....

Image

@ovflowd
Copy link
Member

ovflowd commented Jul 16, 2025

just 270ish comments on the PR, 🍰

@avivkeller
Copy link
Member Author

There are some visual nitpicks of my liking that if you don't mind would be nice (for me) to be addressed just as it makes my brain go less brrrr.

Sure! Let me know what they are, I'll be happy to investigate (or perhaps you already mentioned them, and I never resolved it?)

@ovflowd
Copy link
Member

ovflowd commented Jul 17, 2025

There are some visual nitpicks of my liking that if you don't mind would be nice (for me) to be addressed just as it makes my brain go less brrrr.

Sure! Let me know what they are, I'll be happy to investigate (or perhaps you already mentioned them, and I never resolved it?)

Pretty much any assignment followed by if statement 😂

@avivkeller
Copy link
Member Author

ahh, I thought you meant the UI

@avivkeller
Copy link
Member Author

Okay, we are so close, everyone!

@ovflowd The following reviews remain unresolved:

I think I've resolved any assignment + if issues.

@avivkeller
Copy link
Member Author

Once those last few reviews are resolved, I'll merge this 🚀

@ovflowd
Copy link
Member

ovflowd commented Jul 17, 2025

@avivkeller feel free to merge!

@ovflowd
Copy link
Member

ovflowd commented Jul 17, 2025

@avivkeller before you merge, ping me on Slack so I can adjust the main branch on Vercel.

@ovflowd ovflowd merged commit 8e48f0c into main Jul 17, 2025
18 checks passed
@ovflowd ovflowd deleted the feat/web/gen branch July 17, 2025 15:23
@avivkeller avivkeller removed this from the Web Generator Migration milestone Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Vercel Deployment once we have minimal CLI + Web generators ready Write React Components Add react-web generator